<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>IT资产管理系统</title>

    <!-- Bootstrap -->
    <link href="../css/bootstrap.min.css" rel="stylesheet">
    <link href="../css/bootstrap-table.css" rel="stylesheet">
    <link href="../css/bootstrap-duallistbox.min.css" rel="stylesheet">
    <link rel="stylesheet" href="../css/toastr.min.css">

    <!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询（media queries）功能 -->
    <!-- 警告：通过 file:// 协议（就是直接将 html 页面拖拽到浏览器中）访问页面时 Respond.js 不起作用 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div th:include="common/logo :: logo"></div>
<div class="input-group col-xs-3" style="margin: 0 auto">
        <input id="searchValue" type="text" class="form-control" placeholder="搜索工号或用户名">
        <span class="input-group-btn">
            <button id="search" class="btn btn-default" type="button">搜索</button>
        </span>
</div>
<div>
    <table id="RoleTable" data-show-jumpto="true"></table>
</div>

<!-- Modal copy -->
<div class="modal fade bs-example-modal-lg" id="settingmod" tabindex="-1" role="dialog" aria-labelledby="setting">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" id="close" class="close"  data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="modal2">设置权限</h4>
            </div>
            <div class="modal-body">
                <select id="workshops" multiple="multiple" name="duallistbox_demo1">
                </select>
            </div>


        <div class="modal-footer">
            <button id="changeRole" value="" type="button" class="fileUpload btn btn-info" onclick="uploadRole();">更改
            </button>

        </div>
        </div>
    </div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="delModal" tabindex="-1" role="dialog" aria-labelledby="del">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">确认操作</h4>
            </div>
            <div class="modal-body" id="delInfo">
               确认删除吗?
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary" onclick="delUser()">删 除</button>
            </div>
        </div>
    </div>
</div>
</body>
<script src="../js/jquery-3.4.0.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/bootstrap-table.min.js"></script>
<script src="../js/jquery.bootstrap-duallistbox.min.js"></script>
<script src="../js/locale/bootstrap-table-zh-CN.js"></script>
<script src="../js/show/table-jumpto.js"></script>
<script src="../js/toastr.min.js"></script>
<script src="../js/show/role.js"></script>
<script th:inline="javascript" type="text/javascript">

    var permission =null
    $(document).ready(function () {
        //添加导航栏选中样式
        $("#permission").addClass("active")
        //从session获取permission
        permission = [[${session.permission}]]


    })
    //根据permission判断该用户是否有权限更改权限
    function checkPermission() {
        if(permission!="sadmin"){
            return false
        }
        return true
    }



</script>

</html>